#include "StateComposite.h"

CStateComposite::CStateComposite(CStateGraph *pStateGraph, CStateData *pStateData) : CState(pStateGraph, pStateData)
{
	TStateCompositeData *pData = GetStateData();

	m_nSizeSubStates = pData->GetSizeSubStatesData();

	m_pSubStates = new CState[m_nSizeSubStates];

	for(int i = 0; i < m_nSizeSubStates; i++)
	{
		m_pSubStates[i] = m_pStateGraph->CreateState(GetSubStateData(i));		
		m_pSubStates[i]->SetParent(this);
	}
}

void CStateComposite::OnEntry(CStateResult *pResult)
{
}

void CStateComposite::OnExit(CStateResult *pResult)
{
}
void CStateComposite::Process(CStateResult *pResult)
{
}
